/*
 * Copyright 2013 Glassy Cinema.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package hu.glassy.core.model;

import hu.glassy.model.common.AbstractEntity;
import java.awt.Dimension;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Represents the main image of the actors and movies
 *
 * @author Alexander Molnár <molnar.alexander@sonrisa.hu>
 */
@Entity
@Table(name = "posterimage")
public class PosterImage extends AbstractEntity
{

  public static final int TITLE_LENGTH = 128;
  public static final boolean TITLE_REQUIRED = false;

  public static final Dimension MICRO_SIZE = new Dimension(34, 48);

  public static final Dimension MINI_SIZE = new Dimension(82, 116);

  public static final Dimension SMALL_SIZE = new Dimension(145, 205);

  public static final Dimension NORMAL_SIZE = new Dimension(215, 304);

  public static final Dimension LARGE_SIZE = new Dimension(647, 915);

  @Column(name = "imagetitle", length = TITLE_LENGTH, nullable = !TITLE_REQUIRED, unique = false)
  private String imageTitle;

  @Column(name = "imagepath", length = 2048, nullable = false, unique = false)
  private String imagePath;

  /**
   * @return the imageTitle
   */
  public String getImageTitle()
  {
    return imageTitle;
  }

  /**
   * @param imageTitle the imageTitle to set
   */
  public void setImageTitle(String imageTitle)
  {
    this.imageTitle = imageTitle;
  }

  /**
   * @return the imagePath
   */
  public String getImagePath()
  {
    return imagePath;
  }

  /**
   * @param imagePath the imagePath to set
   */
  public void setImagePath(String imagePath)
  {
    this.imagePath = imagePath;
  }

}
